public class Solution762 {
    public int countPrimeSetBits(int left, int right) {
        int ans=0;
        boolean[] f=new boolean[]{false,false,true,true,false,true,false,true,false,false,false,true,false,true,false,false,false,true,false,true,false};
        for (int i=left;i<=right;i++){
            if (f[Integer.bitCount(i)]){
                ans++;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new Solution762().countPrimeSetBits(10,15));
    }
}
